import React from "react";
import Controller from "../../../../Controller";

export default function usePalm(controller: Controller) {

    const selectedTool = controller.useMemo(s => s.selectedTool, []);

    const controls = controller.useMemo(s => s.controls, []);

    React.useEffect(() => {
        if (controls) {
            controls.enabled = selectedTool === 'palm';
        }
    }, [controls, selectedTool])
}